# -*- coding: utf-8 -*-
# @Time    : 2023/8/3 4:37 下午
# @Author  : Wu WanJie

import gradio as gr


def greet(name):
    return "您输入的数据是: " + name + "!"


# demo = gr.Interface(fn=greet, inputs="text", outputs="text")

with gr.Blocks() as demo:
    name = gr.Textbox(label="Name")
    output = gr.Textbox(label="Output Box")
    greet_btn = gr.Button("Greet")
    greet_btn.click(fn=greet, inputs=name, outputs=output, api_name="greet")
demo.launch(server_name="0.0.0.0", server_port=15000)
